{
printk(KERN_ALERT "Starting Xen Balloon driver\n");
- most_seen_pages = current_pages = min(start_info.nr_pages,max_pfn);
+ most_seen_pages = current_pages = min(xen_start_info.nr_pages,max_pfn);
if ( (balloon_pde = create_xen_proc_entry("memory_target", 0644)) == NULL )
{
printk(KERN_ALERT "Unable to create balloon driver proc entry!");
/*
* make a new phys map if mem= says xen can give us memory to grow
*/
- if ( max_pfn > start_info.nr_pages )
+ if ( max_pfn > xen_start_info.nr_pages )
{
extern unsigned long *phys_to_machine_mapping;
unsigned long *newmap;
newmap = (unsigned long *)vmalloc(max_pfn * sizeof(unsigned long));
memset(newmap, ~0, max_pfn * sizeof(unsigned long));
memcpy(newmap, phys_to_machine_mapping,
- start_info.nr_pages * sizeof(unsigned long));
+ xen_start_info.nr_pages * sizeof(unsigned long));
phys_to_machine_mapping = newmap;
}
ENTRY(_stext)
cld
lss stack_start,%esp
- /* Copy the necessary stuff from start_info structure. */
- mov $SYMBOL_NAME(start_info_union),%edi
+ /* Copy the necessary stuff from xen_start_info structure. */
+ mov $SYMBOL_NAME(xen_start_info_union),%edi
mov $128,%ecx
rep movsl
jmp SYMBOL_NAME(start_kernel)
}
queue_multicall2(__HYPERVISOR_stack_switch, __KERNEL_DS, next->esp0);
- if ( start_info.flags & SIF_PRIVILEGED )
+ if ( xen_start_info.flags & SIF_PRIVILEGED )
{
dom0_op_t op;
op.cmd = DOM0_IOPL;
int enable_acpi_smp_table;
/* Raw start-of-day parameters from the hypervisor. */
-union start_info_union start_info_union;
+union xen_start_info_union xen_start_info_union;
#define COMMAND_LINE_SIZE 256
static char command_line[COMMAND_LINE_SIZE];
int mem_param = 0;
/* Save unparsed command line copy for /proc/cmdline */
- memcpy(saved_command_line, start_info.cmd_line, COMMAND_LINE_SIZE);
+ memcpy(saved_command_line, xen_start_info.cmd_line, COMMAND_LINE_SIZE);
saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
for (;;) {
* arch/xen/drivers/balloon/balloon.c
*/
mem_param = parse_mem_cmdline(cmdline_p);
- if (!mem_param) mem_param = start_info.nr_pages;
+ if (!mem_param) mem_param = xen_start_info.nr_pages;
#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
#define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
}
#endif
- phys_to_machine_mapping = (unsigned long *)start_info.mfn_list;
- cur_pgd = init_mm.pgd = (pgd_t *)start_info.pt_base;
+ phys_to_machine_mapping = (unsigned long *)xen_start_info.mfn_list;
+ cur_pgd = init_mm.pgd = (pgd_t *)xen_start_info.pt_base;
- start_pfn = (__pa(start_info.pt_base) >> PAGE_SHIFT) +
- start_info.nr_pt_frames;
+ start_pfn = (__pa(xen_start_info.pt_base) >> PAGE_SHIFT) +
+ xen_start_info.nr_pt_frames;
/*
* Initialize the boot-time allocator, and free up all RAM. Then reserve
* bootstrap page table. We are guaranteed to get >=512kB unused 'padding'
* for our own use after all bootstrap elements (see hypervisor-if.h).
*/
- boot_pfn = min((int)start_info.nr_pages,lmax_low_pfn);
+ boot_pfn = min((int)xen_start_info.nr_pages,lmax_low_pfn);
bootmap_size = init_bootmem(start_pfn,boot_pfn);
free_bootmem(0, PFN_PHYS(boot_pfn));
reserve_bootmem(__pa(&_stext),
#ifdef CONFIG_BLK_DEV_INITRD
- if ( start_info.mod_start != 0 )
+ if ( xen_start_info.mod_start != 0 )
{
- if ( (__pa(start_info.mod_start) + start_info.mod_len) <=
+ if ( (__pa(xen_start_info.mod_start) + xen_start_info.mod_len) <=
(max_low_pfn << PAGE_SHIFT) )
{
- initrd_start = start_info.mod_start;
- initrd_end = initrd_start + start_info.mod_len;
+ initrd_start = xen_start_info.mod_start;
+ initrd_end = initrd_start + xen_start_info.mod_len;
initrd_below_start_ok = 1;
}
else
{
printk(KERN_ERR "initrd extends beyond end of memory "
"(0x%08lx > 0x%08lx)\ndisabling initrd\n",
- __pa(start_info.mod_start) + start_info.mod_len,
+ __pa(xen_start_info.mod_start) + xen_start_info.mod_len,
max_low_pfn << PAGE_SHIFT);
initrd_start = 0;
}
virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
/* If we are a privileged guest OS then we should request IO privileges. */
- if ( start_info.flags & SIF_PRIVILEGED )
+ if ( xen_start_info.flags & SIF_PRIVILEGED )
{
dom0_op_t op;
op.cmd = DOM0_IOPL;
current->thread.io_pl = 1;
}
- if (start_info.flags & SIF_INITDOMAIN )
+ if (xen_start_info.flags & SIF_INITDOMAIN )
{
- if( !(start_info.flags & SIF_PRIVILEGED) )
+ if( !(xen_start_info.flags & SIF_PRIVILEGED) )
panic("Xen granted us console access but not privileged status");
#if defined(CONFIG_VT)
}
__setup("independent_wallclock", __independent_wallclock);
#define INDEPENDENT_WALLCLOCK() \
- (independent_wallclock || (start_info.flags & SIF_INITDOMAIN))
+ (independent_wallclock || (xen_start_info.flags & SIF_INITDOMAIN))
#ifdef CONFIG_XEN_PRIVILEGED_GUEST
/*
last_update_from_xen = 0;
#ifdef CONFIG_XEN_PRIVILEGED_GUEST
- if ( start_info.flags & SIF_INITDOMAIN )
+ if ( xen_start_info.flags & SIF_INITDOMAIN )
{
dom0_op_t op;
last_update_to_rtc = last_update_to_xen = 0;
}
#ifdef CONFIG_XEN_PRIVILEGED_GUEST
- if ( (start_info.flags & SIF_INITDOMAIN) &&
+ if ( (xen_start_info.flags & SIF_INITDOMAIN) &&
((time_status & STA_UNSYNC) == 0) )
{
/* Send synchronised time to Xen approximately every minute. */
/* create tables only for boot_pfn frames. max_low_pfn may be sized for
* pages yet to be allocated from the hypervisor, or it may be set
- * to override the start_info amount of memory
+ * to override the xen_start_info amount of memory
*/
- int boot_pfn = min(start_info.nr_pages,max_low_pfn);
+ int boot_pfn = min(xen_start_info.nr_pages,max_low_pfn);
/*
* This can be zero as well - no problem, in that case we exit
zone_sizes_init();
/* Switch to the real shared_info page, and clear the dummy page. */
- set_fixmap(FIX_SHARED_INFO, start_info.shared_info);
+ set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
memset(empty_zero_page, 0, sizeof(empty_zero_page));
/* add only boot_pfn pages of low memory to free list.
* max_low_pfn may be sized for
* pages yet to be allocated from the hypervisor, or it may be set
- * to override the start_info amount of memory
+ * to override the xen_start_info amount of memory
*/
- int boot_pfn = min(start_info.nr_pages,max_low_pfn);
+ int boot_pfn = min(xen_start_info.nr_pages,max_low_pfn);
/* this will put all low memory onto the freelists */
totalram_pages += free_all_bootmem();
reservedpages++;
}
#ifdef CONFIG_HIGHMEM
- for (pfn = start_info.nr_pages-1; pfn >= highstart_pfn; pfn--)
+ for (pfn = xen_start_info.nr_pages-1; pfn >= highstart_pfn; pfn--)
one_highpage_init((struct page *) (mem_map + pfn), pfn, bad_ppro);
totalram_pages += totalhigh_pages;
#endif
{
unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
- if (!(start_info.flags & SIF_PRIVILEGED))
+ if (!(xen_start_info.flags & SIF_PRIVILEGED))
return -ENXIO;
/* DONTCOPY is essential for Xen as copy_page_range is broken. */
#define SYSRQ_KEY 0x54
-#define kbd_controller_present() (start_info.flags & SIF_INITDOMAIN)
+#define kbd_controller_present() (xen_start_info.flags & SIF_INITDOMAIN)
/* resource allocation */
#define kbd_request_region()
/* Set up the stack pointer */
lss stack_start,%esp
- /* Copy the necessary stuff from start_info structure. */
- mov $start_info_union,%edi
+ /* Copy the necessary stuff from xen_start_info structure. */
+ mov $xen_start_info_union,%edi
mov $128,%ecx
rep movsl
if ((new_io_pl > old_io_pl) && !capable(CAP_SYS_RAWIO))
return -EPERM;
- if (!(start_info.flags & SIF_PRIVILEGED))
+ if (!(xen_start_info.flags & SIF_PRIVILEGED))
return -EPERM;
/* Maintain OS privileges even if user attempts to relinquish them. */
C(0); C(1); C(2);
#undef C
- if (start_info.flags & SIF_PRIVILEGED) {
+ if (xen_start_info.flags & SIF_PRIVILEGED) {
op.cmd = DOM0_IOPL;
op.u.iopl.domain = DOMID_SELF;
op.u.iopl.iopl = next->io_pl;
int nr_multicall_ents = 0;
/* Raw start-of-day parameters from the hypervisor. */
-union start_info_union start_info_union;
+union xen_start_info_union xen_start_info_union;
extern void (*pm_idle)(void);
int len = 0;
int userdef = 0;
- memcpy(saved_command_line, start_info.cmd_line, MAX_CMDLINE);
+ memcpy(saved_command_line, xen_start_info.cmd_line, MAX_CMDLINE);
/* Save unparsed command line copy for /proc/cmdline */
saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
* partially used pages are not usable - thus
* we are rounding upwards:
*/
- start_pfn = PFN_UP(__pa(start_info.pt_base)) + start_info.nr_pt_frames;
+ start_pfn = PFN_UP(__pa(xen_start_info.pt_base)) + xen_start_info.nr_pt_frames;
find_max_pfn();
#endif
#ifdef CONFIG_BLK_DEV_INITRD
- if (start_info.mod_start) {
+ if (xen_start_info.mod_start) {
if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
/*reserve_bootmem(INITRD_START, INITRD_SIZE);*/
initrd_start = INITRD_START + PAGE_OFFSET;
}
#endif
- phys_to_machine_mapping = (unsigned long *)start_info.mfn_list;
+ phys_to_machine_mapping = (unsigned long *)xen_start_info.mfn_list;
return max_low_pfn;
}
init_mm.start_code = (unsigned long) _text;
init_mm.end_code = (unsigned long) _etext;
init_mm.end_data = (unsigned long) _edata;
- init_mm.brk = (PFN_UP(__pa(start_info.pt_base)) + start_info.nr_pt_frames) << PAGE_SHIFT;
+ init_mm.brk = (PFN_UP(__pa(xen_start_info.pt_base)) + xen_start_info.nr_pt_frames) << PAGE_SHIFT;
code_resource.start = virt_to_phys(_text);
code_resource.end = virt_to_phys(_etext)-1;
register_memory(max_low_pfn);
/* If we are a privileged guest OS then we should request IO privs. */
- if (start_info.flags & SIF_PRIVILEGED) {
+ if (xen_start_info.flags & SIF_PRIVILEGED) {
dom0_op_t op;
op.cmd = DOM0_IOPL;
op.u.iopl.domain = DOMID_SELF;
current->thread.io_pl = 1;
}
- if (start_info.flags & SIF_INITDOMAIN) {
- if (!(start_info.flags & SIF_PRIVILEGED))
+ if (xen_start_info.flags & SIF_INITDOMAIN) {
+ if (!(xen_start_info.flags & SIF_PRIVILEGED))
panic("Xen granted us console access "
"but not privileged status");
}
__setup("independent_wallclock", __independent_wallclock);
#define INDEPENDENT_WALLCLOCK() \
- (independent_wallclock || (start_info.flags & SIF_INITDOMAIN))
+ (independent_wallclock || (xen_start_info.flags & SIF_INITDOMAIN))
/*
* Reads a consistent set of time-base values from Xen, into a shadow data
last_update_from_xen = 0;
#ifdef CONFIG_XEN_PRIVILEGED_GUEST
- if (start_info.flags & SIF_INITDOMAIN) {
+ if (xen_start_info.flags & SIF_INITDOMAIN) {
dom0_op_t op;
last_rtc_update = last_update_to_xen = 0;
op.cmd = DOM0_SETTIME;
}
#ifdef CONFIG_XEN_PRIVILEGED_GUEST
- if (!(start_info.flags & SIF_INITDOMAIN))
+ if (!(xen_start_info.flags & SIF_INITDOMAIN))
return;
/* Send synchronised time to Xen approximately every minute. */
*/
void __init paging_init(void)
{
- pgd_t *old_pgd = (pgd_t *)start_info.pt_base;
+ pgd_t *old_pgd = (pgd_t *)xen_start_info.pt_base;
pgd_t *new_pgd = swapper_pg_dir;
#ifdef CONFIG_XEN_PHYSDEV_ACCESS
int i;
flush_page_update_queue();
/* Completely detached from old tables, so free them. */
- free_bootmem(__pa(old_pgd), start_info.nr_pt_frames << PAGE_SHIFT);
+ free_bootmem(__pa(old_pgd), xen_start_info.nr_pt_frames << PAGE_SHIFT);
#ifdef CONFIG_X86_PAE
/*
/* Switch to the real shared_info page, and clear the dummy page. */
flush_page_update_queue();
- set_fixmap_ma(FIX_SHARED_INFO, start_info.shared_info);
+ set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info);
HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
memset(empty_zero_page, 0, sizeof(empty_zero_page));
#ifdef CONFIG_XEN_PRIVILEGED_GUEST
/* Setup mapping of lower 1st MB */
for (i = 0; i < NR_FIX_ISAMAPS; i++)
- if (start_info.flags & SIF_PRIVILEGED)
+ if (xen_start_info.flags & SIF_PRIVILEGED)
set_fixmap_ma(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
else
set_fixmap_ma_ro(FIX_ISAMAP_BEGIN - i,
{
control_if_t *ctrl_if = get_ctrl_if();
- if ( start_info.flags & SIF_INITDOMAIN )
+ if ( xen_start_info.flags & SIF_INITDOMAIN )
{
/*
* The initial domain must create its own domain-controller link.
op.u.bind_interdomain.dom2 = DOMID_SELF;
if ( HYPERVISOR_event_channel_op(&op) != 0 )
BUG();
- start_info.domain_controller_evtchn = op.u.bind_interdomain.port1;
+ xen_start_info.domain_controller_evtchn = op.u.bind_interdomain.port1;
initdom_ctrlif_domcontroller_port = op.u.bind_interdomain.port2;
}
ctrl_if_tx_resp_cons = ctrl_if->tx_resp_prod;
ctrl_if_rx_req_cons = ctrl_if->rx_resp_prod;
- ctrl_if_evtchn = start_info.domain_controller_evtchn;
+ ctrl_if_evtchn = xen_start_info.domain_controller_evtchn;
ctrl_if_irq = bind_evtchn_to_irq(ctrl_if_evtchn);
#define SA_STATIC_ACTION 0x01000000 /* so that free_irq() doesn't do kfree() */
HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
clear_fixmap(FIX_SHARED_INFO);
- memcpy(&suspend_record->resume_info, &start_info, sizeof(start_info));
+ memcpy(&suspend_record->resume_info, &xen_start_info, sizeof(xen_start_info));
HYPERVISOR_suspend(virt_to_machine(suspend_record) >> PAGE_SHIFT);
shutting_down = -1;
- memcpy(&start_info, &suspend_record->resume_info, sizeof(start_info));
+ memcpy(&xen_start_info, &suspend_record->resume_info, sizeof(xen_start_info));
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- set_fixmap_ma(FIX_SHARED_INFO, start_info.shared_info);
+ set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info);
#else
- set_fixmap(FIX_SHARED_INFO, start_info.shared_info);
+ set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
#endif
HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
#else
unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
- if (!(start_info.flags & SIF_PRIVILEGED))
+ if (!(xen_start_info.flags & SIF_PRIVILEGED))
return -ENXIO;
/* Currently we're not smart about setting PTE cacheability. */
{
int i;
- if ( !(start_info.flags & SIF_INITDOMAIN) &&
- !(start_info.flags & SIF_BLK_BE_DOMAIN) )
+ if ( !(xen_start_info.flags & SIF_INITDOMAIN) &&
+ !(xen_start_info.flags & SIF_BLK_BE_DOMAIN) )
return 0;
blkif_interface_init();
{
int i;
- if ( (start_info.flags & SIF_INITDOMAIN)
- || (start_info.flags & SIF_BLK_BE_DOMAIN) )
+ if ( (xen_start_info.flags & SIF_INITDOMAIN)
+ || (xen_start_info.flags & SIF_BLK_BE_DOMAIN) )
return 0;
printk(KERN_INFO "[XEN] Initialising virtual block device driver\n");
void xen_console_init(void)
#endif
{
- if ( start_info.flags & SIF_INITDOMAIN )
+ if ( xen_start_info.flags & SIF_INITDOMAIN )
{
if ( xc_mode == XC_DEFAULT )
xc_mode = XC_SERIAL;
int sz;
/* Emergency console is synchronous, so there's nothing to flush. */
- if ( start_info.flags & SIF_INITDOMAIN )
+ if ( xen_start_info.flags & SIF_INITDOMAIN )
return;
/*
int sz, work_done = 0;
ctrl_msg_t msg;
- if ( start_info.flags & SIF_INITDOMAIN )
+ if ( xen_start_info.flags & SIF_INITDOMAIN )
{
if ( x_char )
{
tty_register_device(xencons_driver, 0, NULL);
#endif
- if ( start_info.flags & SIF_INITDOMAIN )
+ if ( xen_start_info.flags & SIF_INITDOMAIN )
{
xencons_priv_irq = bind_virq_to_irq(VIRQ_CONSOLE);
(void)request_irq(xencons_priv_irq,
if ( (ret = tty_unregister_driver(DRV(xencons_driver))) != 0 )
printk(KERN_ERR "Unable to unregister Xen console driver: %d\n", ret);
- if ( start_info.flags & SIF_INITDOMAIN )
+ if ( xen_start_info.flags & SIF_INITDOMAIN )
{
free_irq(xencons_priv_irq, NULL);
unbind_virq_from_irq(VIRQ_CONSOLE);
int i;
struct page *page;
- if ( !(start_info.flags & SIF_NET_BE_DOMAIN) &&
- !(start_info.flags & SIF_INITDOMAIN) )
+ if ( !(xen_start_info.flags & SIF_NET_BE_DOMAIN) &&
+ !(xen_start_info.flags & SIF_INITDOMAIN) )
return 0;
printk("Initialising Xen netif backend\n");
{
int err = 0;
- if ( (start_info.flags & SIF_INITDOMAIN) ||
- (start_info.flags & SIF_NET_BE_DOMAIN) )
+ if ( (xen_start_info.flags & SIF_INITDOMAIN) ||
+ (xen_start_info.flags & SIF_NET_BE_DOMAIN) )
return 0;
IPRINTK("Initialising virtual ethernet driver.\n");
static int __init privcmd_init(void)
{
- if ( !(start_info.flags & SIF_PRIVILEGED) )
+ if ( !(xen_start_info.flags & SIF_PRIVILEGED) )
return 0;
privcmd_intf = create_xen_proc_entry("privcmd", 0400);
who = "Xen";
start_pfn = 0;
- max_pfn = start_info.nr_pages;
+ max_pfn = xen_start_info.nr_pages;
e820.nr_map = 0;
add_memory_region(PFN_PHYS(start_pfn), PFN_PHYS(max_pfn) - PFN_PHYS(start_pfn), E820_RAM);
#define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF))
#define LOADER_TYPE (*(unsigned char *) (PARAM+0x210))
#define KERNEL_START (*(unsigned long *) (PARAM+0x214))
-#define INITRD_START (__pa(start_info.mod_start))
-#define INITRD_SIZE (start_info.mod_len)
+#define INITRD_START (__pa(xen_start_info.mod_start))
+#define INITRD_SIZE (xen_start_info.mod_len)
#define EDID_INFO (*(struct edid_info *) (PARAM+0x440))
#define EDD_NR (*(unsigned char *) (PARAM+EDDNR))
#define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
#include <asm/page.h>
/* arch/xen/i386/kernel/setup.c */
-union start_info_union
+union xen_start_info_union
{
- start_info_t start_info;
+ start_info_t xen_start_info;
char padding[512];
};
-extern union start_info_union start_info_union;
-#define start_info (start_info_union.start_info)
+extern union xen_start_info_union xen_start_info_union;
+#define xen_start_info (xen_start_info_union.xen_start_info)
/* arch/xen/kernel/process.c */
void xen_cpu_idle (void);